package com.sunline.poc.oozie;

import org.apache.oozie.client.AuthOozieClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class Application {

    @Autowired
    private  ApplicationProperties applicationProperties;

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Bean
    public AuthOozieClient authOozieClient(){
        return  new AuthOozieClient(applicationProperties.getOozieUrl(), AuthOozieClient.AuthType.KERBEROS.name());
    }
}
